<?php
/**
 * Created by PhpStorm.
 * User: ma
 * Date: 2017/12/25
 * Time: 17:04
 */

namespace app\common\model;


use think\Model;

class AgentArea extends Model
{
    protected $pk = 'agem_id';
    protected $type = [
        'agem_create_time'  =>  'timestamp:Y/m/d H:i:s'
    ];

    /**
     * 获取代理代理区域
     * @return $this
     */
    public function getarea(){
        return $this->belongsTo('Area','agea_area','id')->bind('id,merger_name');
    }
}